<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:p="http://primefaces.org/ui"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets">
    <h:head>
        <title>Database Performance Dashboard</title>
        <p:resources/>
    </h:head>
    <h:body>
        <ui:composition template="loginTemplate.xhtml">
            <ui:define name="top"><h1>Database Performance Dashboard</h1></ui:define>
            
            <ui:define name="content">
                <h:form>
                    <p:growl id="growl" showDetail="true" life="3000" /> 
                    <h:panelGrid columns="2" cellpadding="5">
                            <h:outputLabel for="username" value="Username:" />
                            <p:inputText value="#{loginBean.username}" 
                                            id="username" required="true" label="username" />

                            <h:outputLabel for="password" value="Password:" />
                            <h:inputSecret value="#{loginBean.password}" 
                                            id="password" required="true" label="password" />

                            <f:facet name="footer">
                                    <p:commandButton id="loginButton" value="Login" update="growl" 
                                            action="#{loginBean.login}" ajax="false"/>
                            </f:facet>
                    </h:panelGrid>
                </h:form>
            </ui:define>
        </ui:composition>
    </h:body>
</html>